<template>
	<view class="head">
		<view class="img" @click="back">
			<image src="https://splendid.oss-cn-beijing.aliyuncs.com/static/zhengyulan/back-arrow.png" mode=""></image>
		</view>
		<view class="message">
			<text>污染防治设施</text>
		</view>
	</view>
	<view class="body">
		<view class="container">
			<view class="inp">
				<input type="text" name="" id="" v-model="sing" placeholder="查询记录日期">
								<uni-datetime-picker v-model="single" @maskClick="maskClick" type="data" @change="dateChange">
								<image src="https://splendid.oss-cn-beijing.aliyuncs.com/static/zhengyulan/data.png" mode=""></image>
								</uni-datetime-picker>
			</view>
			<view class="heads">
				<view class="dj">
					<view class="imgsd">
						<view v-for="(item,index) in data" @click="chnage(index)"
							:class=" currindex == index ? 'active' : 'njuii' ">{{item.name}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>

<scroll-view scroll-y="true" class="scroll-container">
	<view class="bodys">
		<view class="container">
			<view class="coaten">
				<view class="text">
					<text class="hjuh">共有<text class="red">20</text>个设施</text>
				</view>
			</view>
			<view class="neirong">
				<view class="neirongs" @click.stop="jump">
					<view class="head">
						<view class="neiy">
						记录日期:<text>2012-06-10</text>
						</view>
						<view class="image">
							<image src="https://splendid.oss-cn-beijing.aliyuncs.com/static/zhengyulan/huisejiantou.png" mode=""></image>
						</view>
						<view class="dash"></view>
						<view class="circle-left"></view>
						<view class="circle-right"></view>
					</view>
					<view class="bbt">
						<view class="bianma">
							设施编码:<text>123456789</text>
						</view>
						<view class="bianma">
							设施类型:<text>废气</text>
						</view>
						<view class="bianma">
							设施规格型号:<text>规格型号</text>
						</view>
						<view class="bianma">
							废气处理量:<text>m³/h</text>
						</view>
						<view class="bianma">
							设计参数温度:<text>30℃</text>
						</view>
						<view class="bianma">
							设计参数压力:<text>0000</text>
						</view>
						<view class="bianma">
							设计参数风量:<text>m³/h</text>
						</view>
						<view class="bianma">
							设计参数风量:<text>m³/h</text>
						</view>
						
					</view>
					<view class="hhs"></view>
				</view>
	
			</view>
			
			
			<view class="neirong">
				<view class="neirongs">
					<view class="head">
						<view class="neiy">
							记录日期:<text>2012-06-10</text>
						</view>
						<view class="image">
							<image src="https://splendid.oss-cn-beijing.aliyuncs.com/static/zhengyulan/huisejiantou.png" mode=""></image>
						</view>
						<view class="dash"></view>
						<view class="circle-left"></view>
						<view class="circle-right"></view>
					</view>
					<view class="bbt">
						<view class="bianma">
							设施编码:<text>123456789</text>
						</view>
						<view class="bianma">
							设施类型:<text>废气</text>
						</view>
						<view class="bianma">
							设施规格型号:<text>规格型号</text>
						</view>
						<view class="bianma">
							运行情况:<text style="color: red;">异常</text>
						</view>
						<view class="bianma">
							报告:<text style="color: #459cfb;">查看报告</text>
						</view>
						<view class="bianma">
							设计参数压力:<text>0000</text>
						</view>
						<view class="bianma">
							设计参数风量:<text>m³/h</text>
						</view>
					</view>
					<view class="hhs"></view>
				</view>
			
			</view>
			
			
			
		</view>
		
		
		
		
		
		
		
		
		
		
		
		
	
	</view>
</scroll-view>



</template>

<script setup>
	import {
		ref
	} from 'vue';

	var data = ref([{
		name: "全部"
	}, {
		name: "正常运行"
	}, {
		name: "异常运行"
	}])
	var currindex = ref(0)

	function chnage(e) {
		console.log(e);
		currindex.value = e
	}
	function jump () {
		uni.navigateTo({
			url:"/homePageOther/FacilityDetails/FacilityDetails"
		})
	}
	function back (){
		uni.navigateBack({
			delta:1
		})
	}
	function Operationrecords () {
		uni.navigateTo({
			url:"/homePageOther/Operationrecords/Operationrecords"
		})
		
	}
	var sing = ref('')
		function maskClick (){
			sing.value = ''
		}
		function dateChange (e){
			console.log(e);
			sing.value = e
		}
</script>

<style lang="scss" scoped>
	.scroll-container {
	  height: calc(100vh - 142rpx - 222rpx - 30rpx); /* 头部高度 + 搜索区域高度 + 间距 */
	  overflow: auto;
	}
	.head {
		width: 750rpx;
		height: 142rpx;
		background: #0874FA;
		position: relative;
		overflow: hidden;
	}

	.img {
		width: 22rpx;
		height: 38rpx;
		position: absolute;
		top: 75rpx;
		left: 40rpx;

		image {
			width: 22rpx;
			height: 38rpx;
		}
	}

	.message {
		width: 220rpx;
		height: 34rpx;
		font-family: Source Han Sans CN;
		font-weight: 500;
		font-size: 36rpx;
		color: #FFFFFF;
		line-height: 34rpx;
		position: absolute;
		top: 75rpx;
		left: 270rpx;

		text {
			display: inline-block;
			width: 220rpx;
			height: 34rpx;
			text-align: center;
			line-height: 34rpx;
		}
	}

	.body {
		width: 100%;
		height: 100%;
		background-color: #f3f5f7;

		.container {
			width: 750rpx;
			height: 222rpx;
			background-color: #FFFFFF;
			overflow: hidden;

			.inp {
				width: 690rpx;
				height: 75rpx;
				background: #F7F7FE;
				border-radius: 38rpx;
				margin: 25rpx auto;
				color: #ABABBB;
				position: relative;
                 display: flex;
                 align-items: center;
                 padding-left: 38rpx;
                 input{
                 	flex: 1;
                 }
				

				image {
					width: 30rpx;
					height: 31rpx;
					position: absolute;
					top: 23rpx;
					right: 45rpx;
				}
			}
		}
	}

	.heads {
		width: 750rpx;
		// background-color: #ABABBB;
		position: relative;
	}

	.dj {
		width: 690rpx;
		height: 65rpx;
		// position: absolute;
		// left: 30rpx;
		margin:  0 auto;
	}

	.imgsd {
	width: 690rpx;
		height: 65rpx;
		font-family: Microsoft YaHei;
		font-size: 28rpx;
		color: #5F666E;
		display: flex;
		justify-content: space-between;
		align-items: center;
		overflow: hidden;
	}

	.njuii,
	.active {
		width: 123rpx;
		height: 65rpx;
		line-height: 65rpx;
		text-align: center;
		transition: all 0.3s ease;
	}

	.njuii {
		color: #5F666E;
	}

	.active {
		background: #DFEDFF;
		color: #0874FA;
		font-weight: bold;
		border-radius: 32rpx;
	}

	.bodys {
		width: 100%;
		height: 100%;
		background-color: #f3f5f7;

		.container {
			width: 750rpx;
			overflow: hidden;

			.coaten {
				width: 690rpx;
				height: 91rpx;
				border-radius: 14rpx;
				border: 1px solid #A7A7A7;
				margin: 21rpx auto;
				background-color: #FFFFFF;

				.text {
					width: 690rpx;
					height: 91rpx;
					display: flex;
					align-items: center;

					.hjuh {
						font-family: Source Han Sans CN;
						font-weight: 400;
						font-size: 31rpx;
						color: #666666;
						margin-left: 26rpx;

						.red {
							color: red;
						}
					}
				}
			}

			.neirong {
				width: 690rpx;
				// height: 742rpx;
				background: #FFFFFF;
				border-radius: 14rpx;
				margin: 25rpx auto;

				.neirongs {
					width: 690rpx;
					// height: 742rpx;
					background: #FFFFFF;
					border-radius: 14rpx;
					position: relative;
	               border-radius: 14rpx;
					.head {
						width: 690rpx;
						height: 90rpx;
                         background-color: #FFFFFF;
						 	border-radius: 14rpx;	border-radius: 14rpx;
						.neiy {
							// width: 303rpx;
							height: 28rpx;
							font-family: Source Han Sans CN;
							font-weight: 500;
							font-size: 31rpx;
							color: #333333;
							line-height: 28rpx;
							position: absolute;
							top: 33rpx;
							left: 27rpx;

							text {
								margin-left: 10rpx;
							}
						}

						.image {
							width: 17rpx;
							height: 30rpx;

							image {
								width: 17rpx;
								height: 30rpx;
								position: absolute;
								right: 48rpx;
								top: 33rpx;
							}
						}

						.dash {
							width: 628rpx;
							// height: 1rpx;
							border: 1px Dashed #E5E5E5;
							position: absolute;
							bottom: 0;
							left: 31rpx;

						}

						.circle-left {
							width: 25rpx;
							height: 25rpx;
							background: #F3F5F7;
							border-radius: 50%;
							position: absolute;
							bottom: -10rpx;
							left: -10rpx;
						}

						.circle-right {
							width: 25rpx;
							height: 25rpx;
							background: #F3F5F7;
							border-radius: 50%;
							position: absolute;
							bottom: -10rpx;
							right: -9rpx;
						}
					}

					.bbt {
						width: 690rpx;
						// height: 640rpx;
						// background-color: green;
						margin-top: 30rpx;
                         position: relative;
						 border-radius: 14rpx;
						.bianma {
							height: 26rpx;
							font-family: Source Han Sans CN;
							font-weight: 400;
							font-size: 28rpx;
							color: #333333;
							line-height: 26rpx;
							margin-bottom: 35rpx;
							margin-left: 27rpx;
							 border-radius: 14rpx;

							text {
								color: #b0b0b0;
								margin-left: 20rpx;
							}
						}

						.anmiu {
							width: 640rpx;
							height: 65rpx;
							// background: #FAA708;
							margin-left: 20rpx;
							margin-bottom: 20rpx;
							// border-radius: 33rpx;
							 border-radius: 14rpx;
							display: flex;
							justify-content: space-between;

							.one {
								width: 193rpx;
								height: 65rpx;
								background: rgba(250, 167, 8, .14);
								border-radius: 33rpx;
								display: flex;
								align-items: center;
								justify-content: center;

								text {
									// width: 130rpx;
									height: 31rpx;
									font-family: Source Han Sans CN;
									font-weight: 500;
									font-size: 33rpx;
									color: #EA980A;
									line-height: 39rpx;
								}
							}

							.two {
								width: 193rpx;
								height: 65rpx;
								background: rgba(210, 247, 230, 1);
								border-radius: 33rpx;
								display: flex;
								align-items: center;
								justify-content: center;

								text {
									// width: 130rpx;
									height: 31rpx;
									font-family: Source Han Sans CN;
									font-weight: 500;
									font-size: 33rpx;
									color: #369E64;
									;
									line-height: 31rpx;
								}
							}

							.three {
								width: 193rpx;
								height: 65rpx;
								background: rgba(8, 116, 250, .14);
								border-radius: 33rpx;
								display: flex;
								align-items: center;
								justify-content: center;

								text {
									// width: 130rpx;
									height: 31rpx;
									font-family: Source Han Sans CN;
									font-weight: 500;
									font-size: 33rpx;
									color: #0874FA;
									line-height: 31rpx;
								}
							}
						}

						.qiyong{
							width: 94rpx;
							height: 48rpx;
							background: rgba(8, 116, 250, .14);
							border-radius: 7rpx;
							display: flex;
							justify-content: center;
							position: absolute;
							right: 45rpx;
							top: 0;
							margin-top: -10rpx;
							// align-items: center;
							text{
								height: 28rpx;
								font-family: Source Han Sans CN;
								font-weight: 400;
								font-size: 31rpx;
								color: #0874FA;
							}
						}
					}
				}

			}
		}
	}

	.hhs {
		height: 20rpx;
		background-color: #FFFFFF;
		border-radius: 14rpx;
	}
</style>